package com.kitchen.ui.dialog
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class DialogHeader extends Sprite
	{
		protected var mainSkin:BitmapData;
		protected var dialogSkin:BitmapData;
		protected var title:String;
		public var h:Number;
		public var w:Number;
		
		public function DialogHeader(main:BitmapData, dialog:BitmapData, title:String)
		{
			super();
			this.mainSkin = main;
			this.dialogSkin = dialog;
			this.title = title;
			this.layout();
		}
		
		private function layout():void{
			this.h = 90;
			this.w = 225;
			var headbg:BitmapData = new BitmapData(225,90);
			headbg.copyPixels(this.mainSkin, new Rectangle(470,445, 225,90), new Point());
			this.addChild(new Bitmap(headbg));
			var head:BitmapData = new BitmapData(145,55);
			head.copyPixels(this.mainSkin, new Rectangle(850,465, 145, 55), new Point());
			var headbd:Bitmap = new Bitmap(head);
			headbd.x = 40;
			headbd.y = 15;
			this.addChild(headbd);
		}
	}
}